package com.glsc.ngateway.oaflow.config;

public class DataSourceSwitcher {

    public static void usePrimaryDataSource() {
        DataSourceContextHolder.setDataSourceType("primary");
    }

    public static void useSecondaryDataSource() {
        DataSourceContextHolder.setDataSourceType("secondary");
    }

    public static String getDataSource() {
        return DataSourceContextHolder.getDataSourceType();
    }

    public static void clear() {
//        DataSourceContextHolder.clearDataSourceType();
    }
}
